package com.cvic.se.config.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data // 生成get、set方法
@AllArgsConstructor // 生成有参数构造方法
@NoArgsConstructor // 生成无参构造函数
public class MyException extends RuntimeException {

	/**
	 * UID
	 */
	private static final long serialVersionUID = -2147130207400772802L;
	
	private Integer code;// 状态码
	private String msg;// 异常信息

	public MyException(Integer code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public MyException() {
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

}
